#!/bin/bash

for file in `dir -d ~/Workspaces/data/lld/trig/*` ; do

echo "File : $file"
cp $file ~/Workspaces/data/lld/tmp/
gzip -d ~/Workspaces/data/lld/tmp/*
bin/hadoop jar se3-0.2.jar org.bikelab.se3.job.Trig2NqJob ~/Workspaces/data/lld/tmp/ ~/Workspaces/data/lld/nq/ >> err.log
gzip -9 ~/Workspaces/data/lld/nq/*
rm ~/Workspaces/data/lld/tmp/*
mv ~/Workspaces/data/lld/nq/* ~/Workspaces/data/lld/nq.gz/
done